/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package rip;


public class Event implements Comparable<Event>  {
    
   float evtime;           /* event time */
   int evtype;             /* event type code */
   int eventity;           /* entity where event occurs */
   rtpkt rtpktptr;         /* ptr to packet (if any) assoc w/ this event */
 //  Event prev;
  // Event next;
   
      
    // Utiliza para comparar ao inserir na PriorityQueue
    @Override
    public int compareTo(Event e) {

        if (this.evtime < e.evtime) {
            return -1;
        }

        if (this.evtime > e.evtime) {
            return 1;
        }

        // se this.evTime == e.evTime
        return 0;
    }

    public Event() {
        this.evtime = 0;
        this.evtype = 0;
        this.eventity = 0;
        this.rtpktptr = null;
    }
   
   

    public float getEvTime() {
        return evtime;
    }

    public void setEvTime(float evtime) {
        this.evtime = evtime;
    }

    public int getEvType() {
        return evtype;
    }

    public void setEvType(int evtype) {
        this.evtype = evtype;
    }

    public int getEvEntity() {
        return eventity;
    }

    public void setEvEntity(int eventity) {
        this.eventity = eventity;
    }

    public rtpkt getRp() {
        return rtpktptr;
    }

    public void setRp(rtpkt rtpktptr) {
        this.rtpktptr = rtpktptr;
    }

}
